約 6,585,299 件
https://w.atwiki.jp/triman/pages/40.html
General Get a mustard pack. What we lack the most is what we lose as we get older mobility, speed, strength/power and elasticity. Not endurance. Pre-Race Practice, Practice, Practice the transition 3 to 4 hours before; up to 2 g carbs per pound of body weight 1 to 2 hours before; up to 1 g carb per pound of body weight The main purpose of the pre-race meal is to fill your liver with glycoge Post-Race The formula is pretty simple. Consume 50-100 grams of carbohydrate and 6-20 grams of protein within 15-20 minutes of finishing, preferably in liquid form. Running Workouts So an athlete training for an Olympic-distance race could run six sets of 1,000 meters at his goal 10k pace followed by a 600 meter recovery run that is slow enough to allow you to hit the next 1,000m rep, but faster than a jog. The shorthand for this workout would be 6x1,000m w/600m steady. Sprint athletes have the same concept for their workout, but the race pace portion is 400 meters and the steady running portion is 200 meters. If you run 10 sets of this, you run 6,000 meters total, with 4,000 meters at goal 5k pace. This workout would be written out as 10x400m w/200m steady. Racing 10k pacing. Mile 1 comfortable, Mile 2-5 steady, Mile 6.2 fast, Your self-talk might be something like repeating smooth or quick to yourself. Bike to Run The number one strategy to run faster is to get in bike shape first. The key to energy management is to minimize the variance in your effor The fact is the more often you run immediately after cycling the more physically AND mentally confident you ll be in your ability to run off the bike. During the bike leg, a good strategy is to ride the first half one gear easier than you feel you can hold Matt Fitzgerald I have found that the most effective way for triathletes to become better pure runners is to focus on running during triathlon s offseason. Pick one or more running races to do over the fall and winter and run up to six times per week to prepare for them. The improvement you experience in this process will carry over to the next triathlon season. The second thing I do with triathletes who are trying to improve their run is to make them stronger cyclists. Again, I strongly suspect that strength on the bike is one of the keys to running well off the bike. This is why I don t encourage triathletes to emphasize run training during the triathlon season. Doing so at the expense of bike training will get you nowhere. Becoming a stronger cyclist is not rocket science. You can do it by riding more or by riding faster or both. Warm Up 6 plyometrics High Knees, Butt Kicks, Spiderman, Frankenstein Walks, Walking Lunges, High Skips dynamic warm-up, teaches your muscles to be explosive, which is helpful for shorter distances, and strengthens your coordination and balance, which is great for longer distances, Carioca with your left foot leading for 30 seconds, then lead with your right to return to the starting point. Tiptoe bounce Take a small jump forward, then to the right, then backward, and then to the left to form a small rectangle. Repeat and advance forward about 20 feet. Switch directions for second set. Good distance runners — even marathoners — do strides in training. A stride is simply a short distance of running that is much faster than race pace. You can go by distance (100m strides) or by time, running roughly 20 seconds fast. You’re not running all out when you do a stride, but you are running faster than 5k race pace. Drils March/SkipDrill A March/SkipDrill B Straight Leg Bound Drill G-Drill Injury The knee (25 to 30 percent of all injuries to endurance runners occur there); The calf and shin (20 percent of all injuries); The IT Band (iliotibial band) - a long sheath of connective tissue which runs from the outside of the hip down to the lateral edge of the knee (10 percent); The Achilles tendon (8 to 10 percent) The foot-the focal point for hobbling injuries like plantar fasciitis (10 percent) Nutrition The American College of Sports Medicine recommends that athletes consume 6 to 10 grams of carbohydrate per kilogram of body weight daily compared to just 1.2 to 1.7 g/kg of protein. Fat needs are represented as a percentage of total calories-specifically 20 to 35 percent of calories-which is also significantly more than the roughly 10 to 20 percent of total calories that the ACSM s weight-based protein recommendations equate to. My 155 lbs equals 70.3 kg. Carbs 60-100g of sugar/ hour. ~ 3 gels.kg 6-10g x 70 kg = 460-700g or 1860 - 2800 calories The morning is when you need the most carbohydrate to replenish liver glycogen stores that have been depleted during the night and to supply immediate energy for the most active part of the day. Protein 1.2-1.7g x 70 = 84-110g or 352-440 cal. 10-20% of total calories Your muscles will repair the damage they suffered during the workout much faster if you consume at least 10 grams of protein in the first hour of recovery than they will if you wait longer to consume the same amount of protein. But taking in protein during the workout itself is even better because it prevents the muscles from suffering some of that damage in the first place. The carb-protein sports drink Accelerade supplies 5 grams of protein per 12 ounces, which is ideal. Note that a little protein goes a long way during exercise and more than a little is sure to cause GI problems In the evening, the body switches hormonally from an activity mode to a repair-and-regenerate mode high levels of protein intake sharply reduce hunger during periods when a person is eating fewer calories than his or her body is using. a high-protein diet has been shown to reduce muscle loss and increase fat loss during periods of caloric deficit Fat Saturated Unsaturated PUFA and MUFA Linoleic acid is from a family of fats known as the omega-6 fats, and alpha-linolenic is from a family of fats known as the omega-3 fats. Two omega-3 fats, docosahexanoic (DHA) and eicosapentaenoic (EPA), are found in fish oils such as salmon and tuna, as well as nuts-especially walnuts, soy, canola and flaxseed oils. Trans fat is found in commercially fried and baked foods such as crackers, cookies and snack foods. It s also found in commercially prepared baked goods, stick margarines and foods containing partially hydrogenated oils. Just like saturated fat, trans fat elevates cholesterol and triglyceride levels and consequently plays a role in heart disease. The pre-run meal provides you with the opportunity to Refill your liver glycogen after an overnight fast and minimize the effects of hypoglycemia Provide accessible and usable carbohydrate/fuel for the early stages of the workout Maximize muscle glycogen stores for use in the later stages of the workout Top off your fluids and help prevent dehydration Settle your stomach by absorbing some of the stomach juices and hold off hunger until the workout is completed Hydration If you weigh 150 pounds, aim for 75g of carb (300) When you re adequately hydrated, your urine will be the color of pale lemonade or straw. If it s clear, you re drinking too much. If it s the color of apple juice, drink more. 18-24 oz. fluid per hour (runners may carry slightly less, but aim for at least 75% of these amounts) Electrolyte Needs For any moderate-to-high intensity training in high heat or humidity, aim for 400-700 mg sodium per hour. If training for 2 hours, ensure you re getting 100-300 mg potassium. If training 3 hours, take 80 mg calcium, and 40 mg magnesium per hour. Any sports drink with 100+ mg sodium and 30+ mg potassium per 8 oz. Another view The general recommendation is no less than 400mL (14 ounces) and no more than 800mL or 28 ounces for each hour. Elite athletes will be on the lower end and less experienced on the higher end. Fluids and Nutrition Needs for Events and Training Daily Water Ingestion 0.5 of body weight in ounces, generally 6 to 9 glasses each day Pre-Event (1 hour prior) 12 to 16 ounces of sports drink (mixed at 40 grams CHO) Pre-Event (15 to 30 minutes prior) 8 to 12 ounces of cool water Pre-Training For working out, ingest 30 minutes prior, 300 calories (40 grams of CHO and optionally 25 grams of protein. For example, CytoSport Pre-Performance is an excellent pre-training (CHO/protein) combination and pre-event product DuringEvent/Training Ingest nothing until 15 minutes into event/training. Then drink 4 to 6 ounces (two to three sips) each 15 minutes (minumum 14 and maximum 28 ounces per hour, if very hot. After Event/Training 16 to 245 ounces during the next 45 to 60 minutes. LT Training the lactate threshold increases the speed at which lactate accumulates and acidosis occurs, enabling runners to run at a higher percentage of VO2 max for a longer time. Increasing the lactate-threshold pace allows runners to run faster before they fatigue because it allows them to run faster before oxygen-independent metabolism begins to play a significant role. Lactate-threshold training is the best aerobic bang for your buck. Pyruvate, the final product of glycolysis, has two fates (1) conversion to Acetyl-Coenzyme A and entry into the Citric Acid Cycle (Krebs Cycle) or (2) conversion to lactic acid. The latter fate occurs when oxygen is not supplied fast enough to meet the needs of the muscle cells When lactic acid is produced at the pH of our body fluids, it immediately releases a proton and thus exists as the molecule lactate rather than as its acid form. At faster speeds, there is a greater reliance on anaerobic glycolysis for energy, and aerobic metabolism (Krebs Cycle and electron transport chain) can t keep up with the production of pyruvate from glycolysis. Pyruvate is thus converted into lactate and lactate removal starts lagging behind lactate production. The lactate threshold is the fastest pace above which lactate production begins to exceed its removal, lactate concentration beginning to increase exponentially If Runner X has a VO2 max of 60 ml/kg/min and a lactate threshold that is 67 percent of her VO2 max, and Runner Y has a VO2 max of 50 ml/kg/min and a lactate threshold that is 80 percent of her VO2 max, both Runner X and Runner Y will be able to sustain a similar intensity, assuming their running economy is equal (67 percent of 60 = 40 ml/kg/min vs. 80 percent of 50 = 40 ml/kg/min). Stretches Anterior Stretch Forward Fold Hamstring Stretch Figure 4 Runner s Lunge Pigeon Hurdler s Stretch Supline Twist Child s Pose Basic Stretches Quads Calfs IT Band Glute/Hamstring Bridge Hamstring Ball Roll Toe Touch Balance Hips Hip circles 3-way lunges Donkey kicks Leg swings Core Plank Ankles Bosu balance Bosu balance with toe touch Exercise Ideas. Frankenstein walk Shoulder taps Bosu Hip Up Bosu Plant to Stand Wood Chop Dumbbell Death Crawl (Pushup and row) Single leg deadlifts Circuit #1 Box Jumps (3 sets, 8 reps) Push-ups (3 sets, 15 reps) Ab Wheel Roll-Outs (3 sets, 10 reps) Circuit #2 Rear Foot Elevated Split Squat(3 sets, 5 per leg) Pull-ups (3 sets, 6 to 8 reps) Tubing Pallof Press(3 sets, 15 per side) Circuit #3 Stability Ball Hamstring Curl(3 sets, 15 reps) Single-Arm Dumbbell Row (3 sets, 6 to 8 reps) Stability Ball Planks(3 sets, 60 seconds) Science Potassium is found primarily inside cells. The recommended daily intake is 4.7 grams. That s 4,700 milligrams. But most people get much less than that from their diet. Most potassium is lost in urine. Very little is lost in sweat. Bananas Potatoes Tomatoes and tomato juice Oranges and orange juice Dates Raisins Soy beans, tofu and edamame Legumes and refried beans Sweet potatoes Greens, such as spinach, kale and beet greens Broccoli Whole grain foods Other fruits and vegetables sodium is the main electrolyte in extracellular fluid. The recommended daily limit on sodium intake is now 1,500 milligrams. It s recommended that you get a minimum of 100 milligrams of sodium per 8 ounces of sports drink. Sodium not only rebalances the fluid and electrolyte ratio in the plasma, but also increases fluid absorption in the gut. as long as you like the taste, it has adequate sodium and some carbs, and you re able to drink around 20 ounces or more per hour, it s a good choice Muscle glycogen stores can provide about 1,400 to 1,800 calories worth of fuel Recovery start with RICE (rest, ice, compression, elevation) on the sore area. If that doesn t work within 24 hours, ibuprofen or a similar pain reliever might help, it s time to check in with a physical therapist Form rollar calves, quads, hamstrings-and don t forget your glutes DOMS or delayed onset of muscle soreness. Physical discomfort is typically muscular in nature and goes away once you ve decreased the intensity or pace. Strength Training Increased muscle strength Increased rate of force development Enhanced neuromuscular function Reduced risk of injuries improves strength, performance, velocity, and running economy in endurance athletes.
https://w.atwiki.jp/opengl/pages/286.html
こちらに OpenGL Simple Adapter があるので使わせてもらいます。 nursの日記http //d.hatena.ne.jp/nurs/20080315/1205598655 使い方は OpenGL Simple Adapter.h をインクルードして OpenGLSimpleAdapter のインスタンスを作成して GLAdapter- BeginRender(); と GLAdapter- EndRender(); の間に いつもの OpenGL のコードを記述するだけです。 OpenGL Simple Adapter.h #pragma once #pragma comment( lib, opengl32.lib ) #pragma comment( lib, glu32.lib ) #pragma comment( lib, gdi32.lib ) #pragma comment( lib, User32.lib ) #include windows.h #include gl/gl.h #include gl/glu.h //↑こいつの#include は、たぶんこことかではなく、 // コードの中でもusing namespace System;とか記述する // よりも前にしないと、C2872 に苦しめられることになる。 public ref class OpenGLSimpleAdapter // ↑CLRでやる場合は、class の前に、public ref を入れてね { // // OpenGL Simple Adaptor loOGLHost (C) 2008 nurs // // 使い方: // 1)本クラスのインスタンスを、ターゲットビューのメンバとして作成する。 // コンストラクタのHDCは、Win32なら // ⇒ GetDC( this- GetSafeHwnd() ) ); // CLRのFormなら、 // ⇒ GetDC( (HWND)parentForm- Handle.ToPointer() ); // などとして取ってきます。 // 2)ターゲットビューの、適切な箇所(初期化、描画、リサイズ)にて、 // 本ホストの、BeginRender()と、EndRender() を呼び出し、その間に、 // 目的のOpenGL描画コードを記述します。 // *)ちなみに利用側コードのどこかのcpp内にて、 //#pragma comment( lib, opengl32.lib ) //#pragma comment( lib, glu32.lib ) //#pragma comment( lib, gdi32.lib ) //#pragma comment( lib, User32.lib ) // の記述も、忘れないで下さい。 // // ★RenderPolicyを予め作成しておき、必要なときに必要な描画 // ポリシーで、Render() をかける、という使い方もできます。 // ★注意:WindowsForm、.NET環境の場合は、プロジェクトの共通言語 // ランタイムサポートを、/clr pure ではなく、/clr にする。 // // public OpenGLSimpleAdapter( HDC dc ){ if(dc==0) return; m_hdc = dc; { static PIXELFORMATDESCRIPTOR pfd={ sizeof(PIXELFORMATDESCRIPTOR), 1, PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, PFD_TYPE_RGBA, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, PFD_MAIN_PLANE, 0, 0, 0, 0 }; GLint iPixelFormat; if( (iPixelFormat = ChoosePixelFormat(m_hdc, pfd) ) == 0) return; if(SetPixelFormat(m_hdc, iPixelFormat, pfd) == FALSE) return; } if( (m_hglrc = wglCreateContext(m_hdc) )==0) return; // pure Managed だとランタイムでエラーに if( (wglMakeCurrent(m_hdc, m_hglrc) )==0) return; wglMakeCurrent(0, 0); return; } ~OpenGLSimpleAdapter( void ){} template class RenderPolicy void Render( RenderPolicy po ){ wglMakeCurrent( this- m_hdc, this- m_hglrc ); po(); wglMakeCurrent( this- m_hdc, 0 ); SwapBuffers( this- m_hdc ); } HDC BeginRender( void ){ wglMakeCurrent( this- m_hdc, this- m_hglrc ); return this- m_hdc; } void EndRender( void ){ wglMakeCurrent( this- m_hdc, 0 ); SwapBuffers( this- m_hdc ); } void EndRenderNoSwap( void ){ wglMakeCurrent( this- m_hdc, 0 ); } private HDC m_hdc; HGLRC m_hglrc; }; /*使用例 まず、OpenGLSimpleAdapterのインスタンスを作成します。 そして、BeginRender() と、EndRender() の間に目的のOpenGLのgl描画コードを書きます。 private System Void Form1_Load(System Object^ sender, System EventArgs^ e) { GLAdapter = gcnew OpenGLSimpleAdapter(GetDC( (HWND)panel1- Handle.ToPointer() )); } private System Void panel1_Paint(System Object^ sender, System Windows Forms PaintEventArgs^ e) { GLAdapter- BeginRender(); { glClearColor( 0,0,0,0 ); glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT ); } GLAdapter- EndRender(); } */ MyForm.cpp #pragma comment(linker, /SUBSYSTEM WINDOWS /ENTRY mainCRTStartup ) #include MyForm.h using namespace opengl; [STAThreadAttribute] int main(){ MyForm ^form1 = gcnew MyForm; form1- ShowDialog(); return 0; } MyForm.h #pragma once #include OpenGL Simple Adapter.h namespace opengl { using namespace System; using namespace System ComponentModel; using namespace System Collections; using namespace System Windows Forms; using namespace System Data; using namespace System Drawing; /// summary /// MyForm の概要 /// /summary public ref class MyForm public System Windows Forms Form { public MyForm(void) { InitializeComponent(); // //TODO ここにコンストラクター コードを追加します // } protected /// summary /// 使用中のリソースをすべてクリーンアップします。 /// /summary ~MyForm() { if (components) { delete components; } } private System Windows Forms Panel^ panel1; protected private /// summary /// 必要なデザイナー変数です。 /// /summary System ComponentModel Container ^components; #pragma region Windows Form Designer generated code /// summary /// デザイナー サポートに必要なメソッドです。このメソッドの内容を /// コード エディターで変更しないでください。 /// /summary void InitializeComponent(void) { this- panel1 = (gcnew System Windows Forms Panel()); this- SuspendLayout(); // // panel1 // this- panel1- Location = System Drawing Point(24, 24); this- panel1- Name = L panel1 ; this- panel1- Size = System Drawing Size(218, 182); this- panel1- TabIndex = 0; this- panel1- Paint += gcnew System Windows Forms PaintEventHandler(this, MyForm panel1_Paint); // // MyForm // this- AutoScaleDimensions = System Drawing SizeF(6, 12); this- AutoScaleMode = System Windows Forms AutoScaleMode Font; this- ClientSize = System Drawing Size(284, 261); this- Controls- Add(this- panel1); this- Name = L MyForm ; this- Text = L MyForm ; this- ResumeLayout(false); } #pragma endregion void Line2D(int x1,int y1,int x2, int y2,float size){ glLineWidth(size); glBegin(GL_LINES); glVertex2i(x1,y1); glVertex2i(x2,y2); glEnd(); } private System Void panel1_Paint(System Object^ sender, System Windows Forms PaintEventArgs^ e) { OpenGLSimpleAdapter^ GLAdapter = gcnew OpenGLSimpleAdapter(GetDC( (HWND)panel1- Handle.ToPointer() )); GLAdapter- BeginRender(); { glClearColor( 0,0,0,0 ); glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT ); glOrtho(0, panel1- Width, panel1- Height, 0, -1, 1); glColor4f(1.0f,1.0f,1.0f,1.0f); Line2D(20,40,200,180,1.0); } GLAdapter- EndRender(); } }; }
https://w.atwiki.jp/babais/pages/45.html
カスタムレベルパック Silver Meadowの攻略 MAP LONELY TEXT RIFT BABADOKU LONELY TEXT-A CONTINENTAL DRIFT LONELY TEXT-B CRAMPED LONELY TEXT-C SEPARATOR LONELY TEXT-D TALL GRASS LONELY TEXT-E MUTATIONS LONELY TEXT-F HOLD IT RIGHT THERE LONELY TEXT-G WHAT IS LOVE? LONELY TEXT-H ASSISTANCE LONELY TEXT-I LIVELY FIRE 左上マスから右にA1,A2,…、下にA1,B1,…として解説する。 LONELY TEXT-A CONTINENTAL DRIFT LEVEL IS TEXT ヒント +... LONELY TEXT IS YOUの文字列が1マス下かつ1マス右に移動してくれれば簡単に作れる 解答 +... RIGHTの左隣でLEVEL IS SHIFTを作り、次のターンにLEVEL IS RIGHT 再度LEVEL IS SHIFTを1ターンだけ作り、LEVEL IS TEXT IS YOUを作る LONELY TEXT-B CRAMPED 解答 +... TEXT IS PULLを崩し、STOPを引っ張る STOPをISの上に配置し、PULLを引っ張る STOPとISによるつっかえを利用してPULLを右上の窪みに入れる LONELY TEXT-C SEPARATOR 解答 +... NOT LONELY TEXT IS YOUの後に←→↑←と移動してNOT TEXT IS YOUにする LONELY TEXT-D TALL GRASS ヒント +... TEXT IS SWAPは確定 WINを下に、LONELYを左に移動させてから↓3でTEXT IS SWAPが外れる TEXT IS YOUとWINの横位置を後1マス引き離すには… ヒント2 +... もしTEXT IS SWAPが外れた時にGRASS IS TEXTが完成すれば、WINの横位置をずらすことができる 解答 +... TEXT IS SWAPを作る GRASSを左下に移動させる WINを下に、LONELYを左にスワップさせる ↓3、←2、→1、↑3、→1 別解 +... GRASS IS STOPは動かさずに、WINを下に、LONELYを左にスワップさせる ↓3、→1、↑3、→1、↓3、→1、↑2、←2、→1 LONELY TEXT-E MUTATIONS ヒント +... ISとROCKを重ねる 旗を岩に変える ROCK IS YOUかつROCK IS WIN 解答 +... ↓1、↑1、→2、↑1、↓1、←1、→1、↓1 LONELY TEXT-F HOLD IT RIGHT THERE ヒント +... A3にIS、C4にcogとPUSH、E5にIS、左端で縦向きにCOG IS WINが作れればクリア可能 ヒント2 +... 左上で縦向きにCOG IS WINを作る その後COG IS STOPを利用して位置調整を行う 解答 +... →2、↓1、←2、↑1、→3、←2、↑1、→1、↓1、←3、→1、↑1、→2、↓3、↑1、←3、→2 LONELY TEXT-G WHAT IS LOVE? ヒント +... 最終目標はBABA IS YOUかつBABA IS WIN 解答 +... BABA IS TEXTでBABAとWINを重ねる BABA/WINをC5に配置する BABAの右側と下側にISが来るよう調整 LOVE IS BABA BABA IS YOUかつBABA IS WIN BABA IS BABAを作っている間はBABA IS TEXTを作っても問題ないことに注意 LONELY TEXT-H ASSISTANCE ヒント +... LONELYを外す 解答 +... ↑2、←1、↓1、↑1、←1、↑2、→1、↓1、←1、↑1、←1、wait1、↓1、wait1、↑2、→2 LONELY TEXT-I LIVELY FIRE ヒント +... 闇雲に動かしてクリアできるステージではない ヒント2 +... FIRE IS YOUを作る 解答 +... →2、↓2、←2、↑2、↓2、→1、↑1、←2、↑2、→1、←2、↑1、→2、←1
https://w.atwiki.jp/sampleisbest/pages/189.html
開発環境 Microsoft Visual C++ 2010 Express (SP1) 実行環境 Microsoft Windows XP Home Edition (SP3) プロジェクトの種類 Win32 プロジェクト プロジェクト名 FontTest アプリケーションの種類 Windows アプリケーション 追加のオプション 空のプロジェクト 文字セット Unicode tmExternalLeading 行間最小の高さ tmInternalLeading 発音符の高さ(tmHeightとtmAscentに含まれる) tmHeight フォントの高さ tmAscent + tmDescent tmAscent gjpqyで下にはみ出ない、発音符を含む高さ tmDescent gjpqyで下にはみ出る高さ フォント作成時に指定するフォントの高さ 正 = 発音符を含む高さ(tmHeight) 負 = 発音符を含まない高さ(tmHeight - tmInternalLeading) 推奨される最小の行の高さ = tmExternalLeading + tmHeight FACE_NAME=Arial FONT_HEIGHT=100 tmHeight=100 tmAscent=80 tmDescent=20 tmInternalLeading=11 tmExternalLeading=3 FACE_NAME=Arial FONT_HEIGHT=-100 tmHeight=112 tmAscent=90 tmDescent=22 tmInternalLeading=12 tmExternalLeading=3 FACE_NAME=MS 明朝 FONT_HEIGHT=100 tmHeight=100 tmAscent=86 tmDescent=14 tmInternalLeading=0 tmExternalLeading=0 FACE_NAME=MS 明朝 FONT_HEIGHT=-100 tmHeight=100 tmAscent=86 tmDescent=14 tmInternalLeading=0 tmExternalLeading=0 FACE_NAME=メイリオ FONT_HEIGHT=100 tmHeight=100 tmAscent=71 tmDescent=29 tmInternalLeading=33 tmExternalLeading=0 FACE_NAME=メイリオ FONT_HEIGHT=-100 tmHeight=150 tmAscent=106 tmDescent=44 tmInternalLeading=50 tmExternalLeading=0 FontTest.cpp // Unicode #include Windows.h #include stdio.h #define APP_NAME TEXT("FontTest") //#define FACE_NAME TEXT("Arial") //#define FACE_NAME TEXT("MS 明朝") #define FACE_NAME TEXT("メイリオ") //#define STRING TEXT("Wgjpqy") #define STRING TEXT("Wgjpqy漢字") #define FONT_HEIGHT -100 // 関数プロトタイプ宣言 void Trace(LPCTSTR format, ...); LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); void OnPaint(HWND hWnd); void OnCreate(void); // 外部変数構造体 static struct { HFONT hFont; int nY[3]; } g; //============================================================================== int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow) { WNDCLASSEX wcx; HWND hWnd; MSG msg; // ウィンドウクラスの登録 ZeroMemory( wcx, sizeof wcx); wcx.cbSize= sizeof wcx; wcx.style= CS_HREDRAW | CS_VREDRAW; wcx.lpfnWndProc= WndProc; wcx.hInstance= hInstance; wcx.hCursor= LoadCursor(NULL, MAKEINTRESOURCE(IDC_ARROW)); wcx.hbrBackground= (HBRUSH)(COLOR_WINDOW + 1); wcx.lpszClassName= APP_NAME; if (RegisterClassEx( wcx) == 0) { return 0; } // ウィンドウの作成 hWnd = CreateWindow( APP_NAME, APP_NAME, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL); if (hWnd == NULL) { return 0; } ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); // メッセージループ while (GetMessage( msg, NULL, 0, 0)) { TranslateMessage( msg); DispatchMessage( msg); } return msg.wParam; } //------------------------------------------------------------------------------ void Trace(LPCTSTR format, ...) { va_list arg_ptr; TCHAR buffer[256]; int size; va_start(arg_ptr, format); size = _vsnwprintf_s(buffer, _TRUNCATE, format, arg_ptr); va_end(arg_ptr); OutputDebugString(buffer); if (size 0) { OutputDebugString(TEXT("...\n")); } } //------------------------------------------------------------------------------ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_PAINT OnPaint(hWnd); return 0; case WM_CREATE OnCreate(); return 0; case WM_DESTROY DeleteObject(g.hFont); PostQuitMessage(0); return 0; } return DefWindowProc(hWnd, uMsg, wParam, lParam); } //------------------------------------------------------------------------------ void OnPaint(HWND hWnd) { PAINTSTRUCT ps; HDC hdc = BeginPaint(hWnd, ps); RECT rc; GetClientRect(hWnd, rc); SetBkMode(hdc, TRANSPARENT); // 補助線 HPEN hPen = CreatePen(PS_SOLID, 0, RGB(255,0,0)); HGDIOBJ hPenOld = SelectObject(hdc, hPen); for (int n = 0; n 3; n++) { MoveToEx(hdc, 0, g.nY[n], NULL); LineTo(hdc, rc.right, g.nY[n]); } SelectObject(hdc, hPenOld); DeleteObject(hPen); // テスト文字列 HGDIOBJ hFontOld = SelectObject(hdc, g.hFont); TextOut(hdc, 0, 0, STRING, wcslen(STRING)); SelectObject(hdc, hFontOld); EndPaint(hWnd, ps); } //------------------------------------------------------------------------------ void OnCreate(void) { // フォントの作成 LOGFONT lf; ZeroMemory( lf, sizeof lf); lf.lfHeight = FONT_HEIGHT; lf.lfCharSet = DEFAULT_CHARSET; wcscpy_s(lf.lfFaceName, FACE_NAME); g.hFont = CreateFontIndirect( lf); // フォント情報の取得 HDC hdc = GetDC(NULL); HGDIOBJ hFontOld = SelectObject(hdc, g.hFont); TEXTMETRIC tm; GetTextMetrics(hdc, tm); SelectObject(hdc, hFontOld); ReleaseDC(NULL, hdc); Trace(TEXT("FACE_NAME=%s\n"), FACE_NAME); Trace(TEXT("FONT_HEIGHT=%d\n"), FONT_HEIGHT); Trace(TEXT("tmHeight=%d\n"), tm.tmHeight); Trace(TEXT("tmAscent=%d\n"), tm.tmAscent); Trace(TEXT("tmDescent=%d\n"), tm.tmDescent); Trace(TEXT("tmInternalLeading=%d\n"), tm.tmInternalLeading); Trace(TEXT("tmExternalLeading=%d\n"), tm.tmExternalLeading); g.nY[0] = tm.tmInternalLeading; g.nY[1] = tm.tmHeight - tm.tmDescent; g.nY[2] = tm.tmHeight; }
https://w.atwiki.jp/touhoukashi/pages/5988.html
【登録タグ N millie 天空の花の都 曲 東方PARTYBOX 博麗神社ver. 発熱巫女~ず】 【注意】 現在、このページはJavaScriptの利用が一時制限されています。この表示状態ではトラック情報が正しく表示されません。 この問題は、以下のいずれかが原因となっています。 ページがAMP表示となっている ウィキ内検索からページを表示している これを解決するには、こちらをクリックし、ページを通常表示にしてください。 /** General styling **/ @font-face { font-family Noto Sans JP ; font-display swap; font-style normal; font-weight 350; src url(https //img.atwikiimg.com/www31.atwiki.jp/touhoukashi/attach/2972/10/NotoSansCJKjp-DemiLight.woff2) format( woff2 ), url(https //img.atwikiimg.com/www31.atwiki.jp/touhoukashi/attach/2972/9/NotoSansCJKjp-DemiLight.woff) format( woff ), url(https //img.atwikiimg.com/www31.atwiki.jp/touhoukashi/attach/2972/8/NotoSansCJKjp-DemiLight.ttf) format( truetype ); } @font-face { font-family Noto Sans JP ; font-display swap; font-style normal; font-weight bold; src url(https //img.atwikiimg.com/www31.atwiki.jp/touhoukashi/attach/2972/13/NotoSansCJKjp-Medium.woff2) format( woff2 ), url(https //img.atwikiimg.com/www31.atwiki.jp/touhoukashi/attach/2972/12/NotoSansCJKjp-Medium.woff) format( woff ), url(https //img.atwikiimg.com/www31.atwiki.jp/touhoukashi/attach/2972/11/NotoSansCJKjp-Medium.ttf) format( truetype ); } rt { font-family Arial, Verdana, Helvetica, sans-serif; } /** Main table styling **/ #trackinfo, #lyrics { font-family Noto Sans JP , sans-serif; font-weight 350; } .track_number { font-family Rockwell; font-weight bold; } .track_number after { content . ; } #track_args, .amp_text { display none; } #trackinfo { position relative; float right; margin 0 0 1em 1em; padding 0.3em; width 320px; border-collapse separate; border-radius 5px; border-spacing 0; background-color #F9F9F9; font-size 90%; line-height 1.4em; } #trackinfo th { white-space nowrap; } #trackinfo th, #trackinfo td { border none !important; } #trackinfo thead th { background-color #D8D8D8; box-shadow 0 -3px #F9F9F9 inset; padding 4px 2.5em 7px; white-space normal; font-size 120%; text-align center; } .trackrow { background-color #F0F0F0; box-shadow 0 2px #F9F9F9 inset, 0 -2px #F9F9F9 inset; } #trackinfo td ul { margin 0; padding 0; list-style none; } #trackinfo li { line-height 16px; } #trackinfo li nth-of-type(n+2) { margin-top 6px; } #trackinfo dl { margin 0; } #trackinfo dt { font-size small; font-weight bold; } #trackinfo dd { margin-left 1.2em; } #trackinfo dd + dt { margin-top .5em; } #trackinfo_help { position absolute; top 3px; right 8px; font-size 80%; } /** Media styling **/ #trackinfo .media th { background-color #D8D8D8; padding 4px 0; font-size 95%; text-align center; } .media td { padding 0 2px; } .media iframe nth-of-type(n+2) { margin-top 0.3em; } .youtube + .nicovideo, .youtube + .soundcloud, .nicovideo + .soundcloud { margin-top 0.75em; } .media_section { display flex; align-items center; text-align center; } .media_section before, .media_section after { display block; flex-grow 1; content ; height 1px; } .media_section before { margin-right 0.5em; background linear-gradient(-90deg, #888, transparent); } .media_section after { margin-left 0.5em; background linear-gradient(90deg, #888, transparent); } .media_notice { color firebrick; font-size 77.5%; } /** Around track styling **/ .next-track { float right; } /** Infomation styling **/ #trackinfo .info_header th { padding .3em .5em; background-color #D8D8D8; font-size 95%; } #trackinfo .infomation_show_btn_wrapper { float right; font-size 12px; user-select none; } #trackinfo .infomation_show_btn { cursor pointer; } #trackinfo .info_content td { padding 0 0 0 5px; height 0; transition .3s; } #trackinfo .info_content ul { padding 0; margin 0; max-height 0; list-style initial; transition .3s; } #trackinfo .info_content li { opacity 0; visibility hidden; margin 0 0 0 1.5em; transition .3s, opacity .2s; } #trackinfo .info_content.infomation_show td { padding 5px; height 100%; } #trackinfo .info_content.infomation_show ul { padding 5px 0; max-height 50em; } #trackinfo .info_content.infomation_show li { opacity 1; visibility visible; } #trackinfo .info_content.infomation_show li nth-of-type(n+2) { margin-top 10px; } /** Lyrics styling **/ #lyrics { font-size 1.06em; line-height 1.6em; } .not_in_card, .inaudible { display inline; position relative; } .not_in_card { border-bottom dashed 1px #D0D0D0; } .tooltip { display flex; visibility hidden; position absolute; top -42.5px; left 0; width 275px; min-height 20px; max-height 100px; padding 10px; border-radius 5px; background-color #555; align-items center; color #FFF; font-size 85%; line-height 20px; text-align center; white-space nowrap; opacity 0; transition 0.7s; -webkit-user-select none; -moz-user-select none; -ms-user-select none; user-select none; } .inaudible .tooltip { top -68.5px; } span hover + .tooltip { visibility visible; top -47.5px; opacity 0.8; transition 0.3s; } .inaudible span hover + .tooltip { top -73.5px; } .not_in_card span.hide { top -42.5px; opacity 0; transition 0.7s; } .inaudible .img { display inline-block; width 3.45em; height 1.25em; margin-right 4px; margin-bottom -3.5px; margin-left 4px; background-image url(https //img.atwikiimg.com/www31.atwiki.jp/touhoukashi/attach/2971/7/Inaudible.png); background-size contain; background-repeat no-repeat; } .not_in_card after, .inaudible .img after { content ; visibility hidden; position absolute; top -8.5px; left 42.5%; border-width 5px; border-style solid; border-color #555 transparent transparent transparent; opacity 0; transition 0.7s; } .not_in_card hover after, .inaudible .img hover after { content ; visibility visible; top -13.5px; left 42.5%; opacity 0.8; transition 0.3s; } .not_in_card after { top -2.5px; left 50%; } .not_in_card hover after { top -7.5px; left 50%; } .not_in_card.hide after { visibility hidden; top -2.5px; opacity 0; transition 0.7s; } /** For mobile device styling **/ .uk-overflow-container { display inline; } #trackinfo.mobile { display table; float none; width 100%; margin auto; margin-bottom 1em; } #trackinfo.mobile th { text-transform none; } #trackinfo.mobile tbody tr not(.media) th { text-align left; background-color unset; } #trackinfo.mobile td { white-space normal; } document.addEventListener( DOMContentLoaded , function() { use strict ; const headers = { title アルバム別曲名 , album アルバム , circle サークル , vocal Vocal , lyric Lyric , chorus Chorus , narrator Narration , rap Rap , voice Voice , whistle Whistle (口笛) , translate Translation (翻訳) , arrange Arrange , artist Artist , bass Bass , cajon Cajon (カホン) , drum Drum , guitar Guitar , keyboard Keyboard , mc MC , mix Mix , piano Piano , sax Sax , strings Strings , synthesizer Synthesizer , trumpet Trumpet , violin Violin , original 原曲 , image_song イメージ曲 }; const rPagename = /(?=^|.*
https://w.atwiki.jp/yakotest/pages/185.html
#contents(page=アザーページ,display=inline) #contents(page=アザーページ) #contents(page=contentsぷらぷら) 大見出しaaa 大見出しccc中見出しdddd #contents() 大見出しaaa 大見出しccc中見出しdddd 大見出しaaa 大見出しccc 中見出しdddd
https://w.atwiki.jp/keroro00innovator/pages/3640.html
SEASONS WINTER! SEASONS WINTER! 発売日 2017年12月13日 レーベル 日本コロムビア CDデイリー最高順位 1位(2017年12月16日) 週間最高順位 2位(2017年12月19日) 月間最高順位 4位(2017年12月) 年間最高順位 112位(2018年) 初動総合売上 20094 累計総合売上 28573 収録内容 曲名 アーティスト タイアップ 視聴 1 ツインテールの風 小日向美穂(津田美波),城ヶ崎美嘉(佳村はるか),速水奏(飯田友子) THE IDOLM@STER シンデレラガールズ キャラソン 2 White again 小早川紗枝(立花理香),櫻井桃華(照井春佳),島村卯月(大橋彩香) 3 Frost 神谷奈緒(松井恵理子),神崎蘭子(内田真礼),脇山珠美(嘉山未紗) 4 冬空プレシャス 片桐早苗(和氣あず未),難波笑美(伊達朱里紗),姫川友紀(杜野まこ) CD/総合ランキング 週 月日 CDシングル 総合シングル 順位 週/月間枚数 累計枚数 順位 週/月間枚数 累計枚数 1 12/19 2 20094 20094 2 20094 20094 2 12/26 5 3260 23354 11 3260 23354 3 18/1/2 9 1480 24834 13 1480 24834 2017年12月 3 24834 24834 4 24834 24834 4 1/9 11 1050 25884 16 1050 25884 5 1/16 20 679 26563 679 26563 6 1/23 335 26898 335 26898 7 1/30 271 27169 271 27169 8 2/6 212 27381 212 27381 2018年1月 44 2547 27381 2547 27381 9 2/13 164 27545 164 27545 10 3/6 256 27801 256 27801 11 3/13 254 28059 254 28059 12 3/20 209 28268 209 28268 13 4/17 157 28425 157 28425 14 4/24 148 28573 148 28573 関連CD 恋が咲く季節 TOMORROW DIAMOND From Teacher To Future! AFTER THE RAIN SEASONS AUTUMN! SEASONS SPRING!
https://w.atwiki.jp/dslbookwip/pages/12.html
このページはhttp //martinfowler.com/dslwip/Intro.htmlからの引用です | DSL-WIP Home | WORK-IN-PROGRESS - this material is still under development An Introductory Example Last significant update 06 Aug 07 Contents Miss Grant s Controller The State Machine Model Programming the Controller with a Domain Specific Language Languages and Model Using Code-Generation Using Language Workbenches Visualization Picking up this book, you may be asking yourself such questions as what is a DSL , how does it fit in with my usual development work and why would I find such a thing useful ? This chapter begins by looking at these questions. I ll talk about what a DSL is, the various types of DSL, the reasons to use a DSL, and the broader topic of language processing. At this stage I won t talk about how the various styles of DSL work - we ll get into that later. Miss Grant s Controller As is usual for me, I ll base this discussion on an example, as I find that a concrete example usually makes it easier to follow an abstract topic like this. Let s imagine a company that makes systems to control access to secret compartments. Their customers are people who are bored with numeric keypads and security codes, instead preferring something recalling bad movies set in gothic castles. So Miss Grant has a secret compartment in her bedroom that is normally locked and concealed. To open it she has to close the door, open the second draw in her chest, turn her bedside light on - and then the secret panel is unlocked for her to open. Mr G has the same basic system for a panel in his bedroom. He has to open his bathroom door and turn on the main light which allows him to open the panel. The panel reveals a safe, but it has an overriding lock that cannot be opened unless he turns his light off and on again. Mr C has a compartment in his office, he has to close his main door, take a picture off the wall, turn his desklight on three times, open the top draw of his filing cabinet, turn the desklight off - and then the panel s unlocked. If he forgets to turn the desklight off, he wants an alarm to sound. Although this example is deliberately whimsical, the underlying point isn t that unusual. What we have is a family of systems which share most components and behaviors, but have some important differences. In this case we have some kind of controller software which communicates with various devices around the room. The variability is in the sequence of actions that can be carried out and the actions that the software does as a result of these sequences. We want to arrange things so that the company can install a new system with the minimum of effort, so it must be easy for them to program the sequence of actions into the controller. Looking at their many customers they realize there is a common theme to the way they behave. The various devices send events as they are manipulated. The system reacts differently to events depending on the recent sequence of events. This style of thinking about behavior is that of a state machine. Thus it makes sense to build a model of a state machine that can be programmed for individual customers at each site. That way the general behavior can be resued for each customer and setting up a new customer just means writing the specific things for each case. The software is written in java, running on a job lot of toasters they picked up from a failed dot com. The State Machine Model There are many varieties of state machine models around, this one is simple, and with a little twist for the this particular case. There are frameworks out there to run state machines, but we can do with something much simpler that s more suited to this particular domain. By doing this we give up some power for an easier job working with it. This issue isn t really part of the DSL discussion so I won t explore it further. To help understand how the state machine model works, let s take Miss Grant s system. Figure 1 State diagram for Miss Grant The system has a controller that receives events and commands from the various devices scattered around. Each event and command has a four letter code that s the actual signal sent through the communication channels. I want to refer to these in the controller code with symbolic names, so I create event and command classes with a code and a name. I keep them as separate classes (with a superclass) as they play different roles in the controller code. class AbstractEvent... private String name, code; public AbstractEvent(String name, String code) { this.name = name; this.code = code; } public String getCode() { return code;} public String getName() { return name;} public class Command extends AbstractEvent public class Event extends AbstractEvent Figure 2 Class diagram of the state machine framework [TBD Add reset event association to class diagram] The key to the structure is that state class. Each state class keeps track of the events and commands. class State... private String name; private List Command actions = new ArrayList Command (); private Map String, Transition transitions = new HashMap String, Transition (); public void addTransition(Event event, State targetState) { transitions.put(event.getCode(), new Transition(this, event, targetState)); } class Transition... private final State source, target; private final Event trigger; public Transition(State source, Event trigger, State target) { this.source = source; this.target = target; this.trigger = trigger; } public State getSource() {return source;} public State getTarget() {return target;} public Event getTrigger() {return trigger;} public String getEventCode() {return trigger.getCode();} The state machine holds on to its start state. class StateMachine... private State start; public StateMachine(State start) { this.start = start; } Any other states in the machine are then those that are reachable from this state. class StateMachine... public Collection State getStates() { List State result = new ArrayList State (); gatherForwards(result, start); return result; } private void gatherForwards(Collection State result, State start) { if (start == null) return; if (result.contains(start)) return; else { result.add(start); for (State next start.getAllTargets()) { gatherForwards(result, next); } return; } } class State... Collection State getAllTargets() { List State result = new ArrayList State (); for (Transition t transitions.values()) result.add(t.getTarget()); return result; } There is one particular wrinkle to this problem. These controllers have a particular nature to them in that most of the time they are in their start state, which is effectively an idle state. There are events that advance the state machine, and there are events that take you back to that start state. For this case opening the door always takes you back to the start. So I let the machine keep track of reset events. class StateMachine... private List Event resetEvents = new ArrayList Event (); public void addResetEvents(Event... events) { for (Event e events) resetEvents.add(e); } I don t need to have a separate structure for reset events here. I could handle this by simply declaring extra transitions on the state machine like this class StateMachine... private void addResetEvent_byAddingTransitions(Event e) { for (State s getStates()) if (!s.hasTransition(e.getCode())) s.addTransition(e, start); } I prefer explicit reset events on the machine becuase that better expresses the intention of what I m trying to do. While it does complicate the machine a bit, it keeps the clarity of my intention of how a general machine is supposed to work, as well as keeping the intention of how a particular machine is defined. With the structure out of the way, now lets move on to the behavior. As it turns out, it s really quite simple. The controller has a handle method that takes the event code it receives from the device. class Controller... private State currentState; private StateMachine machine; public CommandChannel getCommandChannel() { return commandsChannel; } protected CommandChannel commandsChannel; public void handle(String eventCode) { if (currentState.hasTransition(eventCode)) transitionTo(currentState.targetState(eventCode)); else if (machine.isResetEvent(eventCode)) transitionTo(machine.getStart()); // ignore unknown events } private void transitionTo(State target) { currentState = target; currentState.executeActions(commandsChannel); } class State... public boolean hasTransition(String eventCode) { return transitions.containsKey(eventCode); } public State targetState(String eventCode) { return transitions.get(eventCode).getTarget(); } public void executeActions(CommandChannel commandsChannel) { for (Command c actions) commandsChannel.send(c.getCode()); } class StateMachine... public boolean isResetEvent(String eventCode) { return resetEventCodes().contains(eventCode); } private List String resetEventCodes() { List String result = new ArrayList String (); for (Event e resetEvents) result.add(e.getCode()); return result; } It ignores any events that are not registered on the state. For any events that are recognized, it transitions to the target state and executes any commands defined on that target state. Programming the Controller with a Domain Specific Language Now I ve implemented the state machine model, I can now program Miss Grant s controller like this. Event doorClosed = new Event( doorClosed , D1CL ); Event drawOpened = new Event( drawOpened , D2OP ); Event lightOn = new Event( lightOn , L1ON ); Event doorOpened = new Event( doorOpened , D1OP ); Event panelClosed = new Event( panelClosed , PNCL ); Command unlockPanelCmd = new Command( unlockPanel , PNUL ); Command lockPanelCmd = new Command( lockPanel , PNLK ); Command lockDoorCmd = new Command( lockDoor , D1LK ); Command unlockDoorCmd = new Command( unlockDoor , D1UL ); State idle = new State( idle ); State activeState = new State( active ); State waitingForLightState = new State( waitingForLight ); State waitingForDrawState = new State( waitingForDraw ); State unlockedPanelState = new State( unlockedPanel ); StateMachine machine = new StateMachine(idle); idle.addTransition(doorClosed, activeState); idle.addAction(unlockDoorCmd); idle.addAction(lockPanelCmd); activeState.addTransition(drawOpened, waitingForLightState); activeState.addTransition(lightOn, waitingForDrawState); waitingForLightState.addTransition(lightOn, unlockedPanelState); waitingForDrawState.addTransition(drawOpened, unlockedPanelState); unlockedPanelState.addAction(unlockPanelCmd); unlockedPanelState.addAction(lockDoorCmd); unlockedPanelState.addTransition(panelClosed, idle); machine.addResetEvents(doorOpened); I look at this last bit of code as quite different in nature to the previous peices. The earlier code described how to build the state machine model, this last bit of code is about how to configure that model for one particular controller. You often see divisions like this. On the one hand is library, framework, or component implementation code; on the other is configuration or component assembly code. Essentially it is the separation of common code from variable code. We structure the common code in a set of components that we then configure for different purposes. Here is another way of representing that configuration code. stateMachine start = idle event name= doorClosed code= D1CL / event name= drawOpened code= D2OP / event name= lightOn code= L1ON / event name= doorOpened code= D1OP / event name= panelClosed code= PNCL / command name= unlockPanel code= PNUL / command name= lockPanel code= PNLK / command name= lockDoor code= D1LK / command name= unlockDoor code= D1UL / state name= idle transition event= doorClosed target= active / action command= unlockDoor / action command= lockPanel / /state state name= active transition event= drawOpened target= waitingForLight / transition event= lightOn target= waitingForDraw / /state state name= waitingForLight transition event= lightOn target= unlockedPanel / /state state name= waitingForDraw transition event= drawOpened target= unlockedPanel / /state state name= unlockedPanel action command= unlockPanel / action command= lockDoor / transition event= panelClosed target= idle / /state resetEvent name = doorOpened / /stateMachine This style of representation should look familiar to most readers, I ve expressed it as an XML file. There are several advantages to doing it this way. One obvious reason is that now we don t have to compile a separate java program for each controller we put into the field - instead we can just compile the state machine components plus an appropritate parser into a common jar, and ship the xml file to be read when the machine starts up. Any changes to the behavior of the controller can be done without having to distribute a new jar. (We do, of course, pay for this in that any mistakes in the syntax of the configuration can only be detected at run time.) A second advantage is in the expressiveness of the file itself. We no longer need to worry about the details of making the various connections through variables. Instead we have a more declarative approach that in many ways reads much more clearly. We re also limited in that we can only express configuration in this file - limitations like this often are helpful because they can reduce the chances for people making mistakes in the component assembly code. These advantages are why so many frameworks in Java and C# are configured with XML configuration files. These days it sometimes feels that you re doing more programming with XML than you are with main programming language. Here s another version of the configuration code. events doorClosed D1CL drawOpened D2OP lightOn L1ON doorOpened D1OP panelClosed PNCL end resetEvents doorOpened end commands unlockPanel PNUL lockPanel PNLK lockDoor D1LK unlockDoor D1UL end state idle actions {unlockDoor lockPanel} doorClosed = active end state active drawOpened = waitingForLight lightOn = waitingForDraw end state waitingForLight lightOn = unlockedPanel end state waitingForDraw drawOpened = unlockedPanel end state unlockedPanel actions {unlockPanel lockDoor} panelClosed = idle end This is code, although not in a syntax that s familiar to you. In fact it s a custom syntax that I made up for this example. I think it s a syntax that s easier to write, and above all easier to read, than the XML syntax. It s terser and avoids a lot of the quoting and noise characters that the XML suffers from. You probably wouldn t have done it exactly the same way, but the point is that you can construct whatever syntax you and your team prefers. You can still load it in at runtime (like the XML) but you don t have to (as you don t with the XML) if you want it at compile time. This language is a Domain Specific Language, and shares many of the characteristics of DSLs. Firstly it s suitable only for a very narrow purpose - it can t do anything other than configure this particular kind of state machine. As a result the DSL is very simple - there s no facility for control structures or anything else. It s not even Turing complete. You couldn t write a whole application in this language - all you can do is describe one small aspect of an application. As a result the DSL has to be combined with other languages to get anything done. But the simplicity of the DSL means it s easy to edit and process. Now look again at the XML representation. Is this a DSL? I would argue that it is. It s wrapped in an XML carrier syntax - but it s still a DSL. This example thus raises a design issue - is it better to have custom syntax for a DSL or an XML syntax? The XML syntax can be easier to parse since people are so familiar with parsing XML. (As it happened for this example it took me the about the same amount of time to write the parser for the custom syntax as it did for the XML.) I d contend that the custom syntax is much easier to read, at least in this case. But however you view this choice the core trade-offs around DSLs are the same. Indeed you can argue that most XML configuration files are essentially DSLs. Let s go back a step further, back to the configuration code in Java I showed you earlier - is that a DSL? While you re thinking about that question look at this code. Does this look like a DSL for this problem? event doorClosed, D1CL event drawOpened, D2OP event lightOn, L1ON event doorOpened, D1OP event panelClosed, PNCL command unlockPanel, PNUL command lockPanel, PNLK command lockDoor, D1LK command unlockDoor, D1UL resetEvents doorOpened state idle do actions unlockDoor, lockPanel transitions doorClosed = active end state active do transitions drawOpened = waitingForLight, lightOn = waitingForDraw end state waitingForLight do transitions lightOn = unlockedPanel end state waitingForDraw do transitions drawOpened = unlockedPanel end state unlockedPanel do actions unlockPanel, lockDoor transitions panelClosed = idle end It s a bit noisier than the custom language earlier, but still pretty clear. Readers who have similar language likings to me will probably know that it s Ruby. Ruby gives me a lot of syntactic options that makes for more readable code, so I can make it look very similar to the custom language. Ruby developers would consider this code to be a DSL. I use a subset of the capabilities of Ruby and capture same ideas as our XML and custom syntax. Essentially I m embedding the DSL into ruby, using a subset of ruby as my syntax. To an extent this is more a matter of attitude than of anything else. I m choosing to look at the Ruby code through DSL glasses. But it s a point of view with a long tradition - Lisp programmers often think of creating DSLs inside Lisp. This brings me to pointing out that there are two kinds of textual DSLs which I call external and internal DSLs. AnExternal DSLis a domain specific language represented in a separate language to the main programming language it s working with. This language may be a custom syntax, or it may follow the syntax of another representation (like XML). AnInternal DSLis DSL expressed within the syntax of a general purpose language. It s a stylized use of that language for a domain specific purpose. You may also hear the termembedded DSLas a synonym for internal DSL. Although it is fairly widely used, I avoid this term because you also hear embedded language applied to scripting languages embedded within applications such as VBA in Excel or Scheme in the Gimp. So I use internal DSL to avoid confusion. Now think again about the original java configuration code - is this a DSL? I would argue that it isn t. That code feels like stitching together with an API, while the ruby code above has more the feel of a declarative language. Does this mean you can t do an internal DSL in Java? How about this? public class BasicStateMachine extends StateMachineBuilder { Events doorClosed, drawOpened, lightOn, panelClosed; Commands unlockPanel, lockPanel, lockDoor, unlockDoor; States idle, active, waitingForLight, waitingForDraw, unlockedPanel; ResetEvents doorOpened; protected void defineStateMachine() { doorClosed. code( D1CL ); drawOpened. code( D2OP ); lightOn. code( L1ON ); panelClosed.code( PNCL ); doorOpened. code( D1OP ); unlockPanel.code( PNUL ); lockPanel. code( PNLK ); lockDoor. code( D1LK ); unlockDoor. code( D1UL ); idle .actions(unlockDoor, lockPanel) .transition(doorClosed).to(active) ; active .transition(drawOpened).to(waitingForLight) .transition(lightOn). to(waitingForDraw) ; waitingForLight .transition(lightOn).to(unlockedPanel) ; waitingForDraw .transition(drawOpened).to(unlockedPanel) ; unlockedPanel .actions(unlockPanel, lockDoor) .transition(panelClosed).to(idle) ; } } It s formatted oddly, and uses some unusual programming conventions, but it is valid Java. It s java written in what is these days called a Fluent Interface style. AFluent Interfaceis an API that s designed to read like an internal DSL. This I would call a DSL - although it s more messy than the ruby DSL it still has that declarative flow that a DSL needs. What makes a fluent interface different to a normal API? This is a tough question that I ll spend more time onlater), but it comes down to a rather fuzzy notion of a language-like flow. Given this distinction it s useful to have a name for a non-fluent API - I ll use the termcommand-query API. Languages and Model There s an important inter-relationship here between the various DSLs and the underlying state-machine model. To implement each of these languages I wrote code that translated from expressions in the DSL into calls on the command-query interface of the model. So while I was parsing the custom syntax version and came across commands unlockPanel PNUL I would create a new command object (new Command( unlockPanel , PNUL )) and keep it to one side (in aSymbol Table) so that when I sawactions {unlockPanelI could add it to the appropriate state (usingaddAction). As a result each DSL I ve shown you created the same configuration of objects in the model. The model, as I discussed earlier, is the engine that provides the behavior of the state-machine. So once we have a populated model, we have a running program whose behavior is encoded in the inter-relationships between the objects in that model. This style is often called an Active Object Model, because in order to understand the behavior of the state machine you can t just look at the code, you also have to look at the way object instances are wired together. Of course this is always true to some extent, any program gives different results with different data, but there is a sense of a greater difference here as the presence of the state objects alters the behavior of the system to a significantly greater degree. When people discuss a programming language you often hear them talk about syntax and semantics. The syntax captures the legal expressions of the program, what in the custom syntax DSL is captured by the grammar. The semantics of a program is what it means, that is what it does when it executes. In this case it is the model that defines those semantics - which is why I will refer to it as aSemantic Model. In this example theSemantic Modelis an object model. ASemantic Modelcan also take other forms. It can be a pure data structure with all behavior in separate functions. I would still refer to it as an active model, because the data structure defines the program s behavior. Looking at it from this point of view, the DSL merely acts as a mechanism for expressing how the model is configured. I often refer to a DSL as a thin facade over a framework. Much of the benefits of using this approach comes from the model rather than the DSLs. The fact that I can easily configure a new state machine for a customer is a property of the model, not the DSL. The fact that I can make a change to a controller at run-time, without compiling, is a feature of the model, not the DSL. The fact I m reusing code across multiple installations of controllers is a property of the model, not the DSL. A model provides many benefits without any DSLs present. As a result we use them all the time. We use libraries and frameworks to wisely avoid work. In our own software we construct our own models, building up abstractions that allow us to program faster. Good models, whether published as libraries and frameworks or just serving our own code, can work just fine without any DSL in sight. But DSLs can enhance the the capabilities of a model. The right DSL makes it easier to understand what a particular state machine does. Some DSLs allow you to configure the model at run time. DSLs are thus a useful adjunct to some models. In discussing this example I described a circumstance where the model was built first, and then I layered a DSL over the model to help manipulate it. I described it that way becuase I think that s an easy way to understand how DSLs fit into software development. Although the model-first case is a common one, it isn t the only one. In a different scenario you talk with the domain experts and posit that a state machine approach is something they understand. You then work with the domain experts to create a DSL that they can understand. In this case you build the DSL and model simultaneously. Using Code-Generation In my discussion so far, I process the DSL by populating theSemantic Modeland then execute theSemantic Modelto provide the behavior that I want from the controller. This approach is what s known in language circles as interpretation. When weinterpretsome text, we parse it and immediately produce the result that we want from the program. (Interpret is a tricky word in software circles, since it carries all sorts of connotations for people, however I ll use it strictly to mean this form of immediate execution.) In the language world, the alternative to interpretation is compilation. Withcompilation, we parse some program text and produce an intermediate output, which is then separately processed to provide the behavior we desire. In the context of DSLs the compilation approach is usually referred to ascode-generation. In this case this might mean generating some java code to represent the particular behavior of Miss Grant s controller. Code generation is often awkward in that it often pushes you to an extra compilation. To build your program you have to first compile the state framework and the parser, then run the parser to generate the source code for Miss Grant s controller, then compile that generated code. This makes your build process much more complicated. However an advantage of code generation is that there s no reason why you have to generate code in same programming language that you use for the parser. In this case you can avoid the second compilation step by generating code for a dynamic language such as javascript or jruby. Code generation is also useful when you want to use DSLs with a language platform that doesn t have the tools for DSL support. I ve come across recent projects that generate code for MathCAD, SQL, and COBOL. Many writings on DSLs focus on code-generation, even to the point of making code-generation the primary aim of the exercise. As a result you can find articles and books extolling the virtues of code-generation. In my view, however, code-generation is merely an implementation mechanism, one that isn t actually needed in most cases. Certainly there are plenty of times when you must use code-generation, but there are even more plenty of times when you don t need it. Using code-generation is one case where many people don t use aSemantic Model. In this case you parse the input text and directly produce the generated code. Although this is a common way of working with code-generated DSLs, it isn t one I reccommend for any but the very simplest cases. Using aSemantic Modelallows me to separate the parsing, the execution semantics, and the code generation into separate problems. This separation makes the whole exercise a lot simpler. It also allows me to change my mind. I can change my DSL from an internal to an external DSL (say) without altering my code-generation routines. Similarly I can easily generate multiple outputs without complicating my parse. I can also use both an interpreted model and code generation off the sameSemantic Model. As a result for almost all of this book, I m going to assume aSemantic Modelis present and the centre of the DSL effort. Using Language Workbenches The two styles of DSL I ve shown so far (internal and external) are the traditional ways of thinking about DSLs. They may not be as widely understood and used as they should be, but they have a long history and moderately wide usage. As a result the rest of this book concentrates on getting you started with these approaches using tools that are mature and easy to obtain. But there is a whole new category of tools on the horizon that could change the game of DSLs significantly tools I call Language Workbenches. ALanguage Workbenchis tool designed to help people create new DSLs, together with high quality tooling required to use those DSLs effectively. One of the big disadvantages of using an external DSL is that you re stuck with relatively limited tooling. Setting up syntax highlighting with a text editor is about as far as most people go. While you can argue that the simplicity of a DSL and the small size of the scripts means that may be enough, there s also an argument for the kind of sophisticated tooling that modern post-IntelliJ IDEs support. Language Workbenches make it easy not just to define a parser, but also to define a custom editing environment for that language. All of this is valuable, but the truly interesting aspect of language workbenches is that they allow a DSL designer to go beyond the the traditional text-based source editing, to different forms of language. The most obvious example of this is support for diagrammatic languages, which would allow me to specify the secret panel state machine directly with a state transition diagram. Figure 3 The secret panel state machine displayed in the MetaEdit language workbench.(source MetaCase) Not just does a tool like this allow you to have diagrammtic languages, it also allows you to look at a DSL script from multiple perspectives. In Figure3there is a diagram, but also lists of states and events, and a table to enter the event codes (which could be ommitted from the diagram if there s too much clutter there). This kind of multi-pane visual editing environment has been around for a while in lots of tools, but it s been a lot of effort to build something like this for yourself. One promise of language workbenches is that they make it quite easy to do this, certainly I was easily able to put together a similar example to Figure3quite quickly on my first play with the MetaEdit tool. The tools allows me to define theSemantic Modelfor state machines, define the graphical and tabular editors in Figure3and write a code generator from theSemantic Model. However, while such tools certainly look good, many developers are naturally suspicious of such doodleware tools. There are some very pragmatic reasons why a textual source representation makes sense. As a result other tools head in that direction, providing post-IntelliJ style capabilities such as syntax-directed editing, symbol completion and the like to textual languages. My own suspicion here is that if language workbenches really take off, the languages they ll produce aren t anything like what we consider to be a programming language. One of the common benefits of tools like this is that they allow non-programmers to program. I often sniff at that notion by pointing out that this was the original intent of COBOL. Yet I must also acknowledge a programming environment that has been extremely successful in providing programming tools to non-programmers who program without thinking of themselves of programming - spreadsheets. In programming language terms spreadsheets are based on a quite unusual computational model. Their appeal comes from a very deep integration of the notions of language and tool. Thus it s no surprise that Charles Simonyi combines both a history of development of these kinds of user tools with a long history of developing ideas in language workbenches. As a result I think that language workbenches have a remarkable potential. If they fulfill this they could entirely change the face of software development. This potential, however profound, is still somewhat in the future. It s still early days for language workbenches with new approaches appearing regularly and older tools still subject to deep evolution. As a result I don t have that much to say about them here, as I think they will change quite dramatically during the hoped-for lifetime of this book. But I do have a chapter on them at the end, as I think they are well worth keeping an eye on. Visualization One the great advantages of using a Language Workbench is that this enables you to a wider range of representations of the DSL, in particular graphical representations. However even with a textual DSL you can obtain a diagrammatic representation. Indeed we saw this very early on in this chapter. When looking at Figure1it might have struck you that the diagram was not as neatly drawn as I usually do. The reason for this is that I didn t draw the diagram, I generated it automatically from theSemantic Modelof Miss Grant s controller. Not just do my state machine classes execute, they also are able to render themselves use the dot language. The dot langauge is part of the GraphViz package, which is an open-source tool that allows you to describe mathematical graph structures (nodes and edges) and then automatically plot them. It figures out how to lay out the graph, you just tell it what the nodes and edges are, what shapes to use, and some other hints. Using a tool like GraphViz is extremely helpful for many kinds of DSLs because it gives another representation. Thisvisualizationrepresentation is similar to the DSL itself in that it allows a human to understand the model. The diference between a visualization and the source is that it isn t editable - however it can provide options that are too hard in an editable form, such as a diagram like this. In the terms of a language workbench you can think of a visualization as a read-only projection. It s something that can be less important for graphical language workbenches, since you use a diagram anyway, but it s still sometimes a handy technique. Visualizations don t have to be graphical. I often use a simple textual visualization to help me debug while I m writing a parser. I ve seen people generate visualizations in Excel to help communicate with domain experts. The point is that once you have done the hard work of creating a component framework like this, adding visualizations is really easy. You ll note here that the visualizations are produced from the framework, not the DSL, so you can do this even if you aren t using a DSL to populate the framework. Indeed the techniques in this book can be used for creating visualizations above and beyond DSL usage. A partial parser for a general purpose language can be used to visualize useful aspects of a general purpose program. Any interesting data strucutre can be visualized in interesting ways. Significant Revisions 06 Aug 07 First Draft 09 Apr 08 Split example from general issues
https://w.atwiki.jp/toram_international/pages/87.html
Home→イベント/Event→Extreme Empress 急げ!新ドメインは早いもの勝ち! Extreme Empress Original Information from Cloverlight(JP player). 日本の方は原文『クローバーライトのトーラムブログ( ノ^ω^)ノ』へ。 Original Info Chapter 1(Japanese) Original Info Chapter 2(Japanese) She has 5 forms. Her ATK increases by break parts. So, we should break parts in 5th form. Cassy sometimes uses Knock Back Circle Saw We can beat Cassy for 10 times attack. We should beat Cassy if you have chance. Form No. Skills Plan 【1st from】 Stun, Tumble × ・Radial prong waves(radial blue linear) Streak attack (fire prong waves and water prong waves) from coner of stage. We should take distance and avoid this attack. ・Prong magic attack(blue wide linear) Target for who taking aggro soon after Radial prong waves. We should take distance and avoid this attack. ・Tumble beam(red wide linear) Target for who taking aggro. You get Tumble if you give this attack. ・Knock Back beam(red wide linear) Target for who taking aggro. 100% fall down from the stage if you take this attack. She sometimes stops a while at center of stage. We should aviod all blue linear and red AOE attack. 【2nd form】Stun, Tumble × Targeting streak attack for who taking aggro. Plan1 Tank should use aggro skills if she changes target except tank. Tank should t take aggro too much. Cancel red AOE attack by changing target from attackers. Plan2 Tank keeps taking aggro and running like large circle. 【3rd form】 Flinch, Stun × Tumble ○ ・Needles AOE on all quarters and center of the stage. ・3 streak magic(blue AOE) Attack for who hasn t aggro and furthest from her. She moves on needles AOE as coner → center → corner (another side). She uses 3 streak magic after moving in this pattern. After she moves, nearest player should use Tumble skills and cancel the 3 streak magic. We shouldn t break in this form. 【4th form】 Flinch, Tumble, Stun ○ ・Fear Streak Magic(red wide linear) She shoots Streak magic to who taking aggro. We get Fear if we take this magic attack. ・4 Element Streak Magic(red circle AOE 4 times) She shoots magic streak attack to who taking aggro. She chases who taking aggro in this streak attacks. Fire→Water→Wind→Earth Tank should keep aggro. And run from red AOE. Cancel Fear Streak Magic by Flinch or Tumble or Stun. 【5th form】 Flinch, Tumble ○ Random attack pattern from 1-4 forms. We should break in this form. Copyright(c) ASOBIMO,Inc. All rights reserved.
https://w.atwiki.jp/pathofexile12/pages/686.html
WinterheartはGold Amuletのユニーク 入手方法 詳説・特徴 関連リンク Winterheart Gold Amulet ステータス要求値:LEVEL42 (12-20)% increased Rarity of Items foundアイテムレアリティが(12-20)%増加 +(20-30) to DexterityDexterityに+(20-30) +(50-70) to maximum Life最大Life+(50-70) +75% to Cold ResistanceCold耐性+75% Cannot be ChilledChillにならなくなる Regenerate 20% of Life per second while FrozenFreezeしている間、20%のLifeリジェネを得る Those who dwell in the deep freezeenjoy a special kind of madness. 入手方法 カード等のドロップ以外の入手方法 アイテム 必要数 備考 Arrogance of the Vaal 8 Jack in the Box 4 詳説・特徴 関連リンク 英wiki https //pathofexile.gamepedia.com/Winterheart Unique Amulets 一覧